class Rectangle implements Shape{
    private double length;
    private double width;

    public Rectangle(double length, double width)
    {
        this.length = length;
        this.width = width;
    }

    @Override
    public String toString()
    {
        return "Rectangle {" +
                "length" + length +
                "width" + width +
                "}";
    }

    @Override
    public double getArea()
    {
        return length * width;
    }

    @Override
    public double getPrimeter()
    {
        return 2 * (length + width);
    }

    @Override
    public void drawing()
    {
        System.out.println("正在绘制一个长" + length + "宽" + width + "的长方体");
    }
}
